from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop012"

firefox = openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox,'商品管理','管理商品')

firefox.find_element_by_name('goods_name').send_keys('美的')
firefox.find_element_by_xpath('//p/button').click()


try:
    firefox.find_element_by_xpath('//td[contains(.,"美的")]')
    writeLog('%s 测试成功'%testCase)
except:
    writeLog('%s 测试失败'%testCase)